import { HintBtnView } from "../mapUI/HintBtnView";
import { LayerManager } from "../../manager/LayerManager";
import { RightTopLayerLine } from "../../manager/RightTopLayerLine";
import { RightTopLayerIndex } from "../../manager/RightTopLayerIndex";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
//class PlayDiceHintButton
    
    export  class PlayDiceHintButton extends HintBtnView
    {
        constructor()
        {
            super();
            this.layer = LayerManager.rightTopUILayer;
            this.line = RightTopLayerLine.lineTwo;
            this.index = RightTopLayerIndex.PlayDiceHintBtn;
            this.createChildren();
            this.addListeners();
            return;
        }

        /* internal  */createChildren(): void
        {
            this._diceBtn = ObjCreate.createGLoadedButton(ResFileConst.PlayDiceHintBtn, 0, 0, 60, 50, this);
            return;
        }

        /* internal  */addListeners(): void
        {
            this._diceBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onPlayDiceBtnClick);
            return;
        }

        /* internal  */onPlayDiceBtnClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.ShowPlayDice));
            return;
        }

        /* internal */ /* var */_diceBtn: GLoadedButton;
    }
